<form action="<?php echo isset($edit_item) ? site_url('message/edit_message') : site_url('message/add_message'); ?>" method="post">
    <?php if(isset($edit_item)){?>
    <input type="hidden" name="id" value="<?php echo $edit_item['id'];?>"/>
    <?php }?>
        <p>
            <label for="name">昵称：</label>
            <input value="<?php echo isset($edit_item) ? $edit_item['name'] : ''; ?>" name="name" id="name" type="text"/>
        </p>

        <p>
            <label for="url">网址：</label>
            <input value="<?php echo isset($edit_item) ? $edit_item['url'] : ''; ?>" name="url" id="url" type="text"/>
        </p>

        <p>
            <label for="title">标题：</label>
            <input value="<?php echo isset($edit_item) ? $edit_item['title'] : ''; ?>" name="title" id="title" type="text"/>
        </p>
        <p>
            <label for="content">内容：</label>
            <textarea name="content" id="content"><?php echo isset($edit_item) ? $edit_item['content'] : ''; ?></textarea>
        </p>

    <p><input type="submit" value="提交"/></p>

</form>
